//
//  YTYunTaiVC.m
//  YUNT
//
//  Created by 梁炜东 on 2017/11/20.
//  Copyright © 2017年 梁炜东. All rights reserved.
//

#import "YTYunTaiVC.h"
#import "YTYunTaiCell.h"
#import "YTYunTaiHead.h"

@interface YTYunTaiVC ()

@end

@implementation YTYunTaiVC

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.backBtn setTitle:Language(@"设置") forState:UIControlStateNormal];
    self.titleLabel.text = Language(@"云台");
    [self.rightBtn setTitle:Language(@"完成") forState:UIControlStateNormal];
    [self.myTableView registerClass:[YTYunTaiCell class] forCellReuseIdentifier:@"YTYunTaiCell"];
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    YTYunTaiHead *head = [[YTYunTaiHead alloc] init];
    head.section = section;
    [head configObject:self.sectionData[section]];
    return head;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    YTYunTaiCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YTYunTaiCell" forIndexPath:indexPath];
    cell.indexPath = indexPath;
    [cell configObject:self.dataSources[indexPath.section]];
    return cell;
}

@end
